-
Notifications
You must be signed in to change notification settings - Fork 377
wasm: add support for wamr (wasm-micro-runtime) #1610
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
0a0611e
to
510c15b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, could you please squash all the patches into a single one?
510c15b
to
4e35186
Compare
I have squashed all the patches into a single one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
can you please run |
src/libcrun/handlers/wamr.c
Outdated
wasm_runtime_set_exception (module_inst, wasi_proc_exit_exception); | ||
ret = false; | ||
} | ||
if (!ret) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ret
is always equal to 0
at this line. The if statement condition is thus always true.
src/libcrun/handlers/wamr.c
Outdated
|
||
// look up a WASM function by its name (The function signature can NULL here) | ||
func = wasm_runtime_lookup_function (module_inst, "_start"); | ||
if (!func || func == NULL) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is
if (!func || func == NULL)
equivalent to
if (func == NULL)
?
(I'm not sure why the ||
is needed)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or to be consistent with style of the other code, just do
if (!func)
2f3d816
to
af46ab4
Compare
Would it be safe to enable the WASI socket api? |
I think it is fine to enable it |
Signed-off-by: usiegl00 <50933431+usiegl00@users.noreply.github.com>
af46ab4
to
b366a78
Compare
Thank you all for pushing crun+wamr forward! Sadly I had no time in September to finalize the PR, since I was finalizing my master's thesis on the topic. If anyone is interested in memory footprint evaluation: https://atlarge-research.com/pdfs/2024-mkozub-msc_thesis.pdf |
thanks, that is interesting |
Hey, @macko99, I am a Runwasi maintainer. Thanks for sharing your thesis on memory footprint and container startup time evaluation on Runwasi. |
This is a revitalization of #1497.
I followed the advice given by a wamr maintainer here:
bytecodealliance/wasm-micro-runtime#3624 (comment)
I also attempted to apply all the requested changes from the original pr.
I have tested the handler with podman on both .wasm and .aot using docs/wasm-wasi-example.md